import $V from './$V';

export default function ad(high, low, close, volume) {
    let shift = $V.sub($V.sub(close, low), $V.sub(high, close));
    let range = $V.add_constant($V.sub(high, low), 0.0001);
    return $V.cumsum($V.mul($V.div(shift, range), volume));
}
